﻿using Entity;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAL
{
    public class Data_Order : Data
    {
        public void Order_Insert(Order data)
        {
            using (SqlCommand cmd = new SqlCommand("sp_Order_Insert", GetConnection()))
            {
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add(new SqlParameter("@Ord_ID", data.Ord_ID));
                cmd.Parameters.Add(new SqlParameter("@Username", data.Username));
                cmd.Parameters.Add(new SqlParameter("@Total", data.Total));
                cmd.Parameters.Add(new SqlParameter("@Date", data.Date));

                cmd.ExecuteNonQuery();
            }
        }

        
    }
}
